/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
    padding: 20px;
}

.task-manager-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.task-manager-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.task-form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.task-form-section h3 {
    color: #555;
    margin-bottom: 15px;
}

#task-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.form-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

#save-task-btn {
    background: #28a745;
    color: white;
}

#save-task-btn:hover {
    background: #218838;
}

#cancel-task-btn {
    background: #6c757d;
    color: white;
}

#cancel-task-btn:hover {
    background: #5a6268;
}

.task-list-section h3 {
    color: #555;
    margin-bottom: 15px;
}

.task-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #e9ecef;
    border: none;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #667eea;
    color: white;
}

.filter-btn:hover {
    background: #dee2e6;
}

.filter-btn.active:hover {
    background: #5a6fd8;
}

.task-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 12px;
    color: #666;
}

#task-list-container {
    list-style: none;
    margin-bottom: 20px;
}

.task-item {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
    transition: box-shadow 0.3s;
}

.task-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.task-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.task-item-title {
    font-weight: 500;
    font-size: 16px;
    margin-right: 10px;
}

.task-item-title.completed {
    text-decoration: line-through;
    color: #6c757d;
}

.task-item-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.priority-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    color: white;
}

.priority-high {
    background: #dc3545;
}

.priority-medium {
    background: #ffc107;
    color: #333;
}

.priority-low {
    background: #28a745;
}

.status-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    color: white;
}

.status-pending {
    background: #6c757d;
}

.status-in-progress {
    background: #17a2b8;
}

.status-completed {
    background: #28a745;
}

.due-date {
    font-size: 12px;
    color: #666;
}

.overdue {
    color: #dc3545;
    font-weight: 500;
}

.task-item-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}

.task-item-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.task-item-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

.edit-task-btn {
    background: #ffc107;
    color: #333;
}

.edit-task-btn:hover {
    background: #e0a800;
}

.delete-task-btn {
    background: #dc3545;
    color: white;
}

.delete-task-btn:hover {
    background: #c82333;
}

.complete-task-btn {
    background: #28a745;
    color: white;
}

.complete-task-btn:hover {
    background: #218838;
}

.task-actions {
    text-align: center;
}

#close-task-manager {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

#close-task-manager:hover {
    background: #5a6268;
}

.no-tasks {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-style: italic;
}

/* 工时显示样式 */
.task-hours {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.task-hours.small {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
    font-weight: 400;
}